The brain in the corpse does not think because is is decaying matter, not a functioning brain anymore.
Learning about the parts of your brain that work on autopilot is fascinating. Whether you want to attribute those functions to an immortal soul, or to a part of your brain that simply functions at the subconscious level......I guess that is on you.
In short, there is no factual evidence for support of an immortal soul. But evidence rarely keeps people from believing in something. Just ask any of us!